<?php
namespace Modules\Frontend\Controllers;

class IndexController extends \Phalcon\Mvc\Controller {
	public function beforeExecuteRoute() {
		\Components\Utils::isClosedFrontent($this);
	}

	public function indexAction() {
		return $this -> response
		-> setStatusCode(200, 'OK') -> sendHeaders()
		-> setContentType('application/json', 'UTF-8')
		-> setJsonContent(['code'=>0,'msg'=>'Success']);
	}

	public function notFoundAction() {
		return $this -> response
		-> setStatusCode(404, 'Not Found') -> sendHeaders()
		-> setContentType('application/json', 'UTF-8')
		-> setJsonContent(['code'=>-1,'msg'=>'Not Found']);
	}
}